<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
PolynomialFunction (Commons Math 3.2 API)
</TITLE>


<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="PolynomialFunction (Commons Math 3.2 API)";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PolynomialFunction.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.Parametric.html" title="class in org.apache.commons.math3.analysis.polynomials"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PolynomialFunction.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.commons.math3.analysis.polynomials</FONT>
<BR>
Class PolynomialFunction</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.commons.math3.analysis.polynomials.PolynomialFunction</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../../org/apache/commons/math3/analysis/DifferentiableUnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">DifferentiableUnivariateFunction</A>, <A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableFunction.html" title="interface in org.apache.commons.math3.analysis.differentiation">UnivariateDifferentiableFunction</A>, <A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>PolynomialFunction</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableFunction.html" title="interface in org.apache.commons.math3.analysis.differentiation">UnivariateDifferentiableFunction</A>, <A HREF="../../../../../../org/apache/commons/math3/analysis/DifferentiableUnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">DifferentiableUnivariateFunction</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>

<P>
Immutable representation of a real polynomial function with real coefficients.
 <p>
 <a href="http://mathworld.wolfram.com/HornersMethod.html">Horner's Method</a>
 is used to evaluate the function.</p>
<P>

<P>
<DL>
<DT><B>Version:</B></DT>
  <DD>$Id: PolynomialFunction.java 1455194 2013-03-11 15:45:54Z luc $</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../../serialized-form.html#org.apache.commons.math3.analysis.polynomials.PolynomialFunction">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->

<A NAME="nested_class_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.Parametric.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction.Parametric</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dedicated parametric polynomial class.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#PolynomialFunction(double[])">PolynomialFunction</A></B>(double[]&nbsp;c)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct a polynomial with the given coefficients.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#add(org.apache.commons.math3.analysis.polynomials.PolynomialFunction)">add</A></B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add a polynomial to the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#degree()">degree</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the degree of the polynomial.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#derivative()">derivative</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the derivative as a <A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis"><CODE>UnivariateFunction</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;double[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#differentiate(double[])">differentiate</A></B>(double[]&nbsp;coefficients)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the coefficients of the derivative of the polynomial with the given coefficients.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;obj)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#evaluate(double[], double)">evaluate</A></B>(double[]&nbsp;coefficients,
         double&nbsp;argument)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Uses Horner's Method to evaluate the polynomial with the given coefficients at
 the argument.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#getCoefficients()">getCoefficients</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a copy of the coefficients array.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#hashCode()">hashCode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#multiply(org.apache.commons.math3.analysis.polynomials.PolynomialFunction)">multiply</A></B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Multiply the instance by a polynomial.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#negate()">negate</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Negate the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#polynomialDerivative()">polynomialDerivative</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the derivative as a <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials"><CODE>PolynomialFunction</CODE></A>.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#subtract(org.apache.commons.math3.analysis.polynomials.PolynomialFunction)">subtract</A></B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A>&nbsp;p)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Subtract a polynomial from the instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a string representation of the polynomial.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/DerivativeStructure.html" title="class in org.apache.commons.math3.analysis.differentiation">DerivativeStructure</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#value(org.apache.commons.math3.analysis.differentiation.DerivativeStructure)">value</A></B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/DerivativeStructure.html" title="class in org.apache.commons.math3.analysis.differentiation">DerivativeStructure</A>&nbsp;t)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simple mathematical function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html#value(double)">value</A></B>(double&nbsp;x)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compute the value of the function for the given argument.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="PolynomialFunction(double[])"><!-- --></A><H3>
PolynomialFunction</H3>
<PRE>
public <B>PolynomialFunction</B>(double[]&nbsp;c)
                   throws <A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A>,
                          <A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></PRE>
<DL>
<DD>Construct a polynomial with the given coefficients.  The first element
 of the coefficients array is the constant term.  Higher degree
 coefficients follow in sequence.  The degree of the resulting polynomial
 is the index of the last non-null element of the array, or 0 if all elements
 are null.
 <p>
 The constructor makes a copy of the input array and assigns the copy to
 the coefficients property.</p>
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>c</CODE> - Polynomial coefficients.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A></CODE> - if <code>c</code> is <code>null</code>.
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></CODE> - if <code>c</code> is empty.</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="value(double)"><!-- --></A><H3>
value</H3>
<PRE>
public double <B>value</B>(double&nbsp;x)</PRE>
<DL>
<DD>Compute the value of the function for the given argument.
 <p>
  The value returned is <br/>
  <code>coefficients[n] * x^n + ... + coefficients[1] * x  + coefficients[0]</code>
 </p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html#value(double)">value</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>x</CODE> - Argument for which the function value should be computed.
<DT><B>Returns:</B><DD>the value of the polynomial at the given point.<DT><B>See Also:</B><DD><A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html#value(double)"><CODE>UnivariateFunction.value(double)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="degree()"><!-- --></A><H3>
degree</H3>
<PRE>
public int <B>degree</B>()</PRE>
<DL>
<DD>Returns the degree of the polynomial.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the degree of the polynomial.</DL>
</DD>
</DL>
<HR>

<A NAME="getCoefficients()"><!-- --></A><H3>
getCoefficients</H3>
<PRE>
public double[] <B>getCoefficients</B>()</PRE>
<DL>
<DD>Returns a copy of the coefficients array.
 <p>
 Changes made to the returned copy will not affect the coefficients of
 the polynomial.</p>
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a fresh copy of the coefficients array.</DL>
</DD>
</DL>
<HR>

<A NAME="evaluate(double[], double)"><!-- --></A><H3>
evaluate</H3>
<PRE>
protected static double <B>evaluate</B>(double[]&nbsp;coefficients,
                                 double&nbsp;argument)
                          throws <A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A>,
                                 <A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></PRE>
<DL>
<DD>Uses Horner's Method to evaluate the polynomial with the given coefficients at
 the argument.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>coefficients</CODE> - Coefficients of the polynomial to evaluate.<DD><CODE>argument</CODE> - Input value.
<DT><B>Returns:</B><DD>the value of the polynomial.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></CODE> - if <code>coefficients</code> is empty.
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A></CODE> - if <code>coefficients</code> is <code>null</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="value(org.apache.commons.math3.analysis.differentiation.DerivativeStructure)"><!-- --></A><H3>
value</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/DerivativeStructure.html" title="class in org.apache.commons.math3.analysis.differentiation">DerivativeStructure</A> <B>value</B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/DerivativeStructure.html" title="class in org.apache.commons.math3.analysis.differentiation">DerivativeStructure</A>&nbsp;t)
                          throws <A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A>,
                                 <A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></PRE>
<DL>
<DD>Simple mathematical function.
 <p><A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableFunction.html" title="interface in org.apache.commons.math3.analysis.differentiation"><CODE>UnivariateDifferentiableFunction</CODE></A> classes compute both the
 value and the first derivative of the function.</p>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableFunction.html#value(org.apache.commons.math3.analysis.differentiation.DerivativeStructure)">value</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/commons/math3/analysis/differentiation/UnivariateDifferentiableFunction.html" title="interface in org.apache.commons.math3.analysis.differentiation">UnivariateDifferentiableFunction</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>t</CODE> - function input value
<DT><B>Returns:</B><DD>function result
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></CODE> - if <code>coefficients</code> is empty.
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A></CODE> - if <code>coefficients</code> is <code>null</code>.<DT><B>Since:</B></DT>
  <DD>3.1</DD>
</DL>
</DD>
</DL>
<HR>

<A NAME="add(org.apache.commons.math3.analysis.polynomials.PolynomialFunction)"><!-- --></A><H3>
add</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A> <B>add</B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A>&nbsp;p)</PRE>
<DL>
<DD>Add a polynomial to the instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - Polynomial to add.
<DT><B>Returns:</B><DD>a new polynomial which is the sum of the instance and <code>p</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="subtract(org.apache.commons.math3.analysis.polynomials.PolynomialFunction)"><!-- --></A><H3>
subtract</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A> <B>subtract</B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A>&nbsp;p)</PRE>
<DL>
<DD>Subtract a polynomial from the instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - Polynomial to subtract.
<DT><B>Returns:</B><DD>a new polynomial which is the difference the instance minus <code>p</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="negate()"><!-- --></A><H3>
negate</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A> <B>negate</B>()</PRE>
<DL>
<DD>Negate the instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a new polynomial.</DL>
</DD>
</DL>
<HR>

<A NAME="multiply(org.apache.commons.math3.analysis.polynomials.PolynomialFunction)"><!-- --></A><H3>
multiply</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A> <B>multiply</B>(<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A>&nbsp;p)</PRE>
<DL>
<DD>Multiply the instance by a polynomial.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>p</CODE> - Polynomial to multiply by.
<DT><B>Returns:</B><DD>a new polynomial.</DL>
</DD>
</DL>
<HR>

<A NAME="differentiate(double[])"><!-- --></A><H3>
differentiate</H3>
<PRE>
protected static double[] <B>differentiate</B>(double[]&nbsp;coefficients)
                                 throws <A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A>,
                                        <A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></PRE>
<DL>
<DD>Returns the coefficients of the derivative of the polynomial with the given coefficients.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>coefficients</CODE> - Coefficients of the polynomial to differentiate.
<DT><B>Returns:</B><DD>the coefficients of the derivative or <code>null</code> if coefficients has length 1.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NoDataException.html" title="class in org.apache.commons.math3.exception">NoDataException</A></CODE> - if <code>coefficients</code> is empty.
<DD><CODE><A HREF="../../../../../../org/apache/commons/math3/exception/NullArgumentException.html" title="class in org.apache.commons.math3.exception">NullArgumentException</A></CODE> - if <code>coefficients</code> is <code>null</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="polynomialDerivative()"><!-- --></A><H3>
polynomialDerivative</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials">PolynomialFunction</A> <B>polynomialDerivative</B>()</PRE>
<DL>
<DD>Returns the derivative as a <A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" title="class in org.apache.commons.math3.analysis.polynomials"><CODE>PolynomialFunction</CODE></A>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the derivative polynomial.</DL>
</DD>
</DL>
<HR>

<A NAME="derivative()"><!-- --></A><H3>
derivative</H3>
<PRE>
public <A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">UnivariateFunction</A> <B>derivative</B>()</PRE>
<DL>
<DD>Returns the derivative as a <A HREF="../../../../../../org/apache/commons/math3/analysis/UnivariateFunction.html" title="interface in org.apache.commons.math3.analysis"><CODE>UnivariateFunction</CODE></A>.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../org/apache/commons/math3/analysis/DifferentiableUnivariateFunction.html#derivative()">derivative</A></CODE> in interface <CODE><A HREF="../../../../../../org/apache/commons/math3/analysis/DifferentiableUnivariateFunction.html" title="interface in org.apache.commons.math3.analysis">DifferentiableUnivariateFunction</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the derivative function.</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
<DL>
<DD>Returns a string representation of the polynomial.

 <p>The representation is user oriented. Terms are displayed lowest
 degrees first. The multiplications signs, coefficients equals to
 one and null terms are not displayed (except if the polynomial is 0,
 in which case the 0 constant term is displayed). Addition of terms
 with negative coefficients are replaced by subtraction of terms
 with positive coefficients except for the first displayed term
 (i.e. we display <code>-3</code> for a constant negative polynomial,
 but <code>1 - 3 x + x^2</code> if the negative coefficient is not
 the first one displayed).</p>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>a string representation of the polynomial.</DL>
</DD>
</DL>
<HR>

<A NAME="hashCode()"><!-- --></A><H3>
hashCode</H3>
<PRE>
public int <B>hashCode</B>()</PRE>
<DL>
<DD>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;obj)</PRE>
<DL>
<DD>
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/PolynomialFunction.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;PREV CLASS&nbsp;
&nbsp;<A HREF="../../../../../../org/apache/commons/math3/analysis/polynomials/PolynomialFunction.Parametric.html" title="class in org.apache.commons.math3.analysis.polynomials"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../../index.html?org/apache/commons/math3/analysis/polynomials/PolynomialFunction.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="PolynomialFunction.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright &#169; 2003-2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.
</BODY>
</HTML>
